package game;

import java.awt.Color;
import java.awt.Graphics;

public class Ball{
	
	private int xCoordinate, yCoordinate, radius;
	private Color color;
	private int xDir = 1, yDir = 2 ;
	
	public Ball(int x, int y , int r, Color c){
		this.xCoordinate = x;
		this.yCoordinate = y;
		this.radius = r;
		this.color = c;
	}
	public int getX(){
		return xCoordinate;
	}
	public int getY(){
		return yCoordinate;
	}
	public void setY(int y){
		yCoordinate = y;
	}
	public int getRadius(){
		return radius;
	}
	public Color getColor(){
		return color;
	}
	public void setXDir(int x){
		xDir = x;
	}
	public void setYDir(int y){
		yDir = y;
	}
	
	public int getXDir(){
		return xDir;
	}
	public int getYDir(){
		return yDir;
	}
	public void setRadius(int r){
		radius = r;
	}
	public void setColor(Color c){
		color = c;
	}
	public void move(){
		xCoordinate = xCoordinate + xDir;
		yCoordinate  = yCoordinate + yDir;
	}
	public void draw(Graphics g){
		Color oldColor = g.getColor();
		g.setColor(color);
		g.fillOval(xCoordinate - radius, yCoordinate - radius, radius * 2, radius * 2 );
		g.setColor(oldColor);
	}
}
